package Move;
import javax.swing.*;
/*
 *@Student 张策
 */
public class yidong extends JFrame{
    MyPanel mp=null;
    public static void main(String[] args) {
        yidong yi = new yidong();
    }
    public yidong(){
        mp=new MyPanel();
        this.add(mp);
        this.setSize(400,300);
        //代表窗口JFrame可以监听键盘实践
        this.addKeyListener(mp);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setVisible(true);
    }
}
